#ifndef _MY_PICTURE_FRAME_H_
#define  _MY_PICTURE_FRAME_H_


#include "wx/wx.h"
#include "Image.h"
#include <string>
#include "GraphicImagePresenter.h"
#include "GraphicImageZoomController.h"
#include "MyWorkThread.h"
#include <time.h>

class wxMYPictureFrame :public wxFrame
{
public:
	wxMYPictureFrame(wxWindow* parent,NOVA::Image* image,std::string&_implement = std::string("Linear_CPP"));
	~wxMYPictureFrame(void);

	void OnPaint(wxPaintEvent& event);
	void OnClose(wxCloseEvent& event);
	void OnTimer(wxTimerEvent& event);
	void OnSave(wxCommandEvent& event);
	void OnEraseBackground(wxEraseEvent& rEvent);
	void OnLbuttonUp(wxMouseEvent &event);
	void OnLbuttonDown(wxMouseEvent &event);
	void OnMouseMove(wxMouseEvent &event);
	void OnRbuttonDown(wxMouseEvent &event);
	void OnSize(wxSizeEvent& sizeevent);
	void OnShowCode(wxCommandEvent& event);
	time_t GetTime(){return t_begin;}

	NOVA::Image * GetImage(){return m_image;}
	//const wxTimer  GetTimer(){return myTimer;}
	wxTimer myTimer;

private:
	NOVA::GraphicImageZoomController *m_zoomer;
	MyThread *workThread;
	NOVA::Image *m_image;
	NOVA::Image *m_img_display;
	time_t t_begin;
	std::string implement;
	NOVA::GraphicImagePresenter *presenter;
	void imagetranceform();

public:
	wxCriticalSection m_critsect;

   DECLARE_EVENT_TABLE()
};

#endif